module.exports = function($scope, $state, $stateParams, $modalInstance, item,$resource,$modal,FileUploader,toaster){
	console.log(item);
    $scope.confirminfo = item;
    $scope.ok = function () {
        var para = {
            'id' : item.id
        }
        para = angular.extend($scope.confirminfo, para);
        $resource('/api/as/mc/mersupplierapply/saveConfirm', {}, {}).            
        save($scope.confirminfo, function(res){
        	console.log($scope.confirminfo);
            if(res.errcode !== 0)
            {
               toaster.success({title:"",body:res.errmsg});
            //    $modalInstance.close();
                
            }
            else
            {   
                toaster.success({title:"",body:"确认成功!"});
                $modalInstance.close();
            }
        });
    };

    $scope.cancel = function () {
      $modalInstance.dismiss('cancel');
    };
    
};